
<?php include('left.php');?>
 <div id="main-content">
   <!-- Main Content Section with everything -->
   <noscript>
   <!-- Show a notification if the user has disabled javascript -->
   <div class="notification error png_bg">
     <div> Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/" title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852" title="Enable Javascript in your browser">enable</a> Javascript to navigate the interface properly.
       Download From <a href="http://www.exet.tk">exet.tk</a></div>
   </div>
   </noscript>
   <!-- Page Head -->
   <h2>围棋订单管理</h2>
   <br/>
   <!--<p id="page-intro">What would you like to do?</p>-->
   <!--
   <ul class="shortcut-buttons-set">
     <li><a class="shortcut-button" href="#"><span> <img src="/images/icons/pencil_48.png" alt="icon" /><br />
       Write an Article </span></a></li>
     <li><a class="shortcut-button" href="#"><span> <img src="/images/icons/paper_content_pencil_48.png" alt="icon" /><br />
       Create a New Page </span></a></li>
     <li><a class="shortcut-button" href="#"><span> <img src="/images/icons/image_add_48.png" alt="icon" /><br />
       Upload an Image </span></a></li>
     <li><a class="shortcut-button" href="#"><span> <img src="/images/icons/clock_48.png" alt="icon" /><br />
       Add an Event </span></a></li>
     <li><a class="shortcut-button" href="#messages" rel="modal"><span> <img src="/images/icons/comment_48.png" alt="icon" /><br />
       Open Modal </span></a></li>
   </ul>
   -->
   <!-- End .shortcut-buttons-set -->

     <div>
         <form action="/administrator/order/search" method="post" name="search_form">
             <input type="hidden" name="export" value="0" id="export_id"/>
        <b>开始时间:</b><input class="text-input small-input" type="text" name="start_time" value="<?=isset($keywords['start_time']) ? $keywords['start_time'] : '';?>" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})">
         &nbsp;&nbsp;
        <b>结束时间:</b><input class="text-input small-input" type="text" name="end_time" value="<?=isset($keywords['end_time']) ? $keywords['end_time'] : '';?>" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})">
         <br/><br/>
        <b>充值账号:</b><input class="text-input small-input" type="text" name="passport" value="<?=isset($keywords['passport']) ? $keywords['passport'] : '';?>" >
         &nbsp;&nbsp;
        <b>订单状态:</b><select name="status">
            <option value="0">所有</option>
            <?php
            $statuss = array(
                '1' => '充值成功',
                '2' => '充值失败',
            );
             foreach ($statuss as $sk=>$sv){?>
            <option value="<?=$sk;?>" <?=(isset ($keywords['status']) && $sk == $keywords['status']) ? 'selected="selected"' : '';?>><?=$sv;?></option>
            <?php }?>
            <!--<option value="2">充值失败</option>-->
        </select>
        <b>充值渠道:</b>
        <select name="channel">
            <option value="0">所有</option>
            <?php
            $channels = array(
                'wsyh' => '网上银行',
                'alipay' => '支付宝',
                'yeepay' => '易宝',
                '99bill' => '快钱',
                'szx' => '神州行',
                'game_card' => '游戏点卡',
            );
            foreach ($channels as $ck=>$cv) {?>
            <option value="<?=$ck;?>" <?=(isset($keywords['channel']) && $ck == $keywords['channel']) ? 'selected="selected"' : '';?>><?=$cv;?></option>
            <?php }?>
            <!--
            <option value="alipay">支付宝</option>
            <option value="yeepay">易宝</option>
            <option value="99bill">快钱</option>
            <option value="szx">神州行</option>
            <option value="game_card">游戏点卡</option>
            -->
        </select>
             &nbsp;&nbsp;&nbsp;&nbsp;
         <input type="submit" value="搜索"/> &nbsp;
         <input type="button" value="导出" name="export" onclick="exports()"/>
         </form>
    </div>
     <br/>
     <div class="clear"></div>
   <!-- End .clear -->
   <div class="content-box">
     <!-- Start Content Box -->
     <div class="content-box-header">
       <h3>订单列表</h3>
       <ul class="content-box-tabs">
           <!--<li><a href="#tab1" class="default-tab">Table</a></li>-->
         <!-- href must be unique and match the id of target div -->
           <!--<li><a href="#tab2">Forms</a></li>-->
       </ul>
       <div class="clear"></div>
     </div>
     <!-- End .content-box-header -->
     <div class="content-box-content">
       <div class="tab-content default-tab" id="tab1">
         <!-- This is the target div. id must match the href of this div's tab -->
           <!--
         <div class="notification attention png_bg"> <a href="#" class="close">
             <img src="/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
           <div> This is a Content Box. You can put whatever you want in it. By the way, you can close this notification with the top-right cross. </div>
         </div>-->
         <table>
           <thead>
             <tr>
               <th>订单ID</th>
               <th>用户名</th>
               <th>金额</th>
               <th>支付渠道</th>
               <th>订单状态</th>
               <th>创建时间</th>
               <th>操作</th>
             </tr>
           </thead>
           <tfoot>
             <tr>
               <td colspan="6">
                   <!--
                 <div class="bulk-actions align-left">
                   <select name="dropdown">
                     <option value="option1">Choose an action...</option>
                     <option value="option2">Edit</option>
                     <option value="option3">Delete</option>
                   </select>
                   <a class="button" href="#">Apply to selected</a> </div>
                    -->
                 <div class="pagination">
                     <!--
                     <a href="#" title="First Page">&laquo; First</a>
                     <a href="#" title="Previous Page">&laquo; Previous</a>
                     <a href="#" class="number" title="1">1</a>
                     <a href="#" class="number" title="2">2</a>
                     <a href="#" class="number current" title="3">3</a>
                     <a href="#" class="number" title="4">4</a>
                     <a href="#" title="Next Page">Next &raquo;</a>
                     <a href="#" title="Last Page">Last &raquo;</a>
                     -->
                     <?=isset($page_html) ? $page_html : '';?>
                 </div>
                 <!-- End .pagination -->
                 <div class="clear"></div>
               </td>
             </tr>
           </tfoot>
           <tbody>
           <?php if ( empty ($data) ) {?>
            <tr><td colspan="7" style="text-align:center;">没有符合条件的记录</td></tr>
            <?php } else {?>
               <?php foreach ($data as $v) {?>
               <tr>
                 <td><?=$v['order_sn']?></td>
                 <td><?=$v['passport']?></td>
                 <td><?=$v['price']?></td>
                 <td><?php
                     switch ($v['pay_service']) {
                         case 'wsyh': $ps = '网上银行';break;
                         case 'alipay': $ps = '支付宝';break;
                         case 'yeepay': $ps = '易宝';break;
                         case '99bill': $ps = '快钱';break;
                         case 'szx': $ps = '神州行';break;
                         case 'game_card': $ps = '游戏点卡';break;
                         default:$ps = '网上银行';
                     }
                     echo $ps;
                     switch ($v['bank_code']) {
                         case 'ICBC-NET-B2C': $bcs = '工商银行'; break;
                         case 'CCB-NET-B2C': $bcs = '建设银行'; break;
                         case 'BOC-NET-B2C': $bcs = '中国银行'; break;
                         case 'ECITIC-NET-B2C': $bcs = '中信银行'; break;
                         case 'CMBCHINA-NET-B2C': $bcs = '招商银行'; break;
                         case 'ABC-NET-B2C': $bcs = '农业银行'; break;
                         case 'SPDB-NET-B2C': $bcs = '浦发银行'; break;
                         case 'SDB-NET-B2C': $bcs = '深圳发展银行'; break;
                         case 'C': $bcs = '盛大一卡通'; break;
                         case 'N': $bcs = '搜狐一卡通'; break;
                         case 'M': $bcs = '网易一卡通'; break;
                         case 'D': $bcs = '征途一卡通'; break;
                         default: $bcs = '';
                     }
                     echo empty ($bcs) ? '' : '--'.$bcs;
                     ?></td>
                   <td><?php
                    switch ($v['order_flag']) {
                        case '0': $ofv = '付款初始'; break;
                        case '1': $ofv = '付款成功'; break;
                        case '2': $ofv = '付款失败'; break;
                    }echo $ofv.'--';
                   switch ($v['exchange_flag']) {
                       case '0': $efv = '兑换初始'; break;
                       case '1': $efv = '兑换成功'; break;
                       case '2': $efv = '兑换失败'; break;
                   }echo $efv;
                    ?></td>
                   <td><?=$v['create_time']?></td>
                 <td>
                   <a href="#" title="Edit"><img src="/images/icons/pencil.png" alt="Edit" /></a>
                   <a href="#" title="Delete"><img src="/images/icons/cross.png" alt="Delete" /></a>
                   <a href="#" title="Edit Meta"><img src="/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a>
                 </td>
               </tr>
               <?php }?>
            <?php }?>
           <!--
             <tr>
               <td>
                 <input type="checkbox" />
               </td>
               <td>Lorem ipsum dolor</td>
               <td><a href="#" title="title">Sit amet</a></td>
               <td>Consectetur adipiscing</td>
               <td>Donec tortor diam</td>
               <td>
                 <a href="#" title="Edit"><img src="/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete">
                   <img src="/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td>
             </tr>
           -->
           </tbody>
         </table>
       </div>
       <!-- End #tab1 -->

       <!-- End #tab2 -->
     </div>
     <!-- End .content-box-content -->
   </div>
   <!-- End .content-box -->
   <!-- End .content-box -->
   <div class="clear"></div>
   <!-- Start Notifications -->

   <!-- End Notifications -->
   <?php require(dirname(__FILE__) . '/footer.php'); ?>
   <!-- End #footer -->
 </div>
 <!-- End #main-content -->
</div>
</body>
<!-- Download From www.exet.tk-->
</html>
<script type="text/javascript">
    function exports()
    {
        document.getElementById('export_id').value = 1;
        document.search_form.submit();
    }
</script>
